#include <stdio.h>

//https://www.nowcoder.com/practice/1654083e09d2432aa24b151d36309155?tpId=290&tags=&title=&difficulty=0&judgeStatus=0&rp=0&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D290

int main() {
    int n = 0;
    int a = 0;
    int b = 0;
    int c = 0;
    int count = 0;
    scanf("%d", &n);
    while (n--) {
        scanf("%d%d%d", &a, &b, &c);
        if (a + b + c < 180) {
            count++;
        }
    }
    printf("%d", count);
    return 0;
}

